<template>
    <el-color-picker v-model="colorValue" @active-change="activeChange"/>
</template>
  <script lang="ts">
export default {
  name: "storeDiyFormColorBtn",
};
</script>
  <script  lang="ts" setup >
import { ref, getCurrentInstance, watch, onMounted } from "vue";
const props = withDefaults(
  defineProps<{
    modelValue:string ;
  }>(),
  {
    modelValue: "",
  }
);

const emit = defineEmits(["update:modelValue", "change"]);

const colorValue = ref<string>(props.modelValue)

const activeChange = (val:string) => {
    emit("update:modelValue",val)
    emit("change",val)
}

</script>